home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-09-16 | 4.6 KB | 177 lines | [TEXT/CCL2] |
-
- (in-package :traps) ;
- ; CommResources.p
- ; Pascal Interface to the Communications Resource Manager
- ;
- ; Copyright © Apple Computer, Inc. 1988-90
- ; All rights reserved
- ;
-
- ;;;;;;;;;;;;;
- ;
- ; Modification History
- ;
- ; 04/28/93 mwp Release
- ; 10/07/92 bill #_initcrm now returns a result code.
- ;
-
- ; $IFC UNDEFINED UsingIncludes
- ; $SETC UsingIncludes := 0
- ; $ENDC
-
- ; $IFC NOT UsingIncludes
-
- ; $ENDC
-
- ; $IFC UNDEFINED UsingCommResources
- ; $SETC UsingCommResources := 1
-
- ; $I+
- ; $SETC CommResourcesIncludes := UsingIncludes
- ; $SETC UsingIncludes := 1
- ; $IFC UNDEFINED UsingOSUtils
-
- (require-interface 'OSUTILS) ; $I $$Shell(PInterfaces)OSUtils.p
- ; $ENDC
-
- ; $SETC UsingIncludes := CommResourcesIncludes
-
- ; current version of the CRM
- (defconstant $curCRMVersion 2)
-
- ; tool classes (also the tool file types)
- (defconstant $classCM :|cbnd|)
- (defconstant $classFT :|fbnd|)
- (defconstant $classTM :|tbnd|)
-
- ; constants general to the use of the Communications Resource Manager
- (defconstant $crmType 9) ; queueType
- (defconstant $crmRecVersion 1) ; version of queue data structure
-
- ; error codes
- (defconstant $crmGenericError -1)
- (defconstant $crmNoErr 0)
-
- ; data structures general to the use of the Communications Resource Manager
- (def-mactype :crmerr (find-mactype :signed-integer))
-
- (def-mactype :crmrecptr (find-mactype :pointer))
- (defrecord CRMRec
- (qLink (:pointer :qelem)) ; reserved
- (qType :signed-integer) ; queue type -- ORD(crmType) = 9
- (crmVersion :signed-integer) ; version of queue element data structure
- (crmPrivate :signed-long) ; reserved
- (crmReserved :signed-integer); reserved
-
- (crmDeviceType :signed-long) ; type of device, assigned by DTS
- (crmDeviceID :signed-long) ; device ID; assigned when CRMInstall is called
- (crmAttributes :signed-long) ; pointer to attribute block
- ; device specific
- (crmStatus :signed-long) ; status variable - device specific
-
- (crmRefCon :signed-long) ; for device private use
- )
-
-
- (defctbtrap _initcrm ()
- #x0501
- :signed-integer)
-
- (defctbtrap _crmgetheader ()
- #x0502
- (:pointer :qhdr))
-
- (defctbtrap _crminstall ((crmreqptr (:pointer :qelem)))
- #x0503)
-
- (defctbtrap _crmremove ((crmreqptr (:pointer :qelem)))
- #x0504
- :oserr)
-
- (defctbtrap _crmsearch ((crmreqptr (:pointer :qelem)))
- #x0505
- (:pointer :qelem))
-
- (defctbtrap _crmgetcrmversion ()
- #x0506
- :integer)
-
- (defctbtrap _crmgetresource ((thetype :ostype)
- (theid :signed-integer))
- #x0507
- :handle)
-
- (defctbtrap _crmget1resource ((thetype :ostype)
- (theid :signed-integer))
- #x0508
- :handle)
-
- (defctbtrap _crmgetindresource ((thetype :ostype)
- (index :signed-integer))
- #x0509
- :handle)
-
- (defctbtrap _crmget1indresource ((thetype :ostype)
- (index :signed-integer))
- #x050A
- :handle)
-
- (defctbtrap _crmgetnamedresource ((thetype :ostype)
- (name (:string 255)))
- #x050B
- :handle)
-
- (defctbtrap _crmget1namedresource ((thetype :ostype)
- (name (:string 255)))
- #x050C
- :handle)
-
- (defctbtrap _crmreleaseresource ((thehandle :handle))
- #x050D)
-
- (defctbtrap _crmgetindex ((thehandle :handle))
- #x050E
- :signed-long)
-
- (defctbtrap _crmlocaltorealid ((bundletype :ostype)
- (toolid :signed-integer)
- (thekind :ostype)
- (localid :signed-integer))
- #x050F
- :integer)
-
- (defctbtrap _crmrealtolocalid ((bundletype :ostype)
- (toolid :signed-integer)
- (thekind :ostype)
- (realid :signed-integer))
- #x0510
- :handle)
-
- (defctbtrap _crmgetindtoolname ((bundletype :ostype)
- (index :signed-integer)
- (toolname (:pointer (:string 255))))
- #x0511
- :oserr)
-
- (defctbtrap _crmfindcommunications ((vrefnum (:pointer :signed-integer))
- (dirid (:pointer :signed-long)))
- #x0512
- :oserr)
-
- (defctbtrap _crmgettoolresource ((procid :signed-integer)
- (thetype :ostype)
- (theid :signed-integer))
- #x0513
- :handle)
-
- (defctbtrap _crmreleasetoolresource ((procid :signed-integer)
- (thehandle :handle))
- #x0514)
-
- ; $ENDC
-
-
- (export '($crmnoerr $crmgenericerror $crmrecversion $crmtype $classtm $classft
- $classcm $curcrmversion))
- (provide-interface 'CommResources)
-